<?php
/**
 * Created by PhpStorm.
 * User: Eric
 * Email: 13522679763@163.com
 * Date: 2018/3/12
 * Time: 14:05
 */
namespace app\admin\model;
use think\Model;
class Banner extends Model
{
    protected $table='cx_banner';
    protected $pk='id';
    //获取列表
    function index($map){
        $result=$this->where($map)->where('status','neq',0)->order('sort')->select();
        if ($result){
            $data['list']  = $result;
            $data['count'] = $this->where('status','>',0)->count();
            return $data;
        } else {
            return;
        }
    }


}